package com.traffic.between.redis.running;

import org.apache.log4j.Logger;

import com.traffic.between.redis.Redis;
import com.traffic.between.util.DictConstantKeys;
import com.traffic.between.util.OrderUtils;
import com.traffic.managent.service.order.bean.OrderBean;

/**
 * 用于处理  traffic接收到api的订单，作为订购中订单的队列
 * @author Guoxing
 *
 */
public class BsmOrderGoodsExecutor implements OrderUtils {

	private static Logger logger = Logger.getLogger(BsmOrderGoodsExecutor.class);

	public final static BsmOrderGoodsExecutor service = new BsmOrderGoodsExecutor();

	public void setOrder(OrderBean order) {
		Redis.use(DictConstantKeys.redis_order_name).rpush(OrderUtils.ORDER_LIST_GOODS, order);
		logger.info("BsmOrderGoodsExecutor set to redis order id:" + order.getIds() + ",phoneNo:" + order.getPhoneNo() +"successful!!!");
	}

}
